package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.SecondCollectionConfig;
import com.sc.nft.entity.dto.BrandConfigVO;
import com.sc.nft.entity.dto.FreeMarketPageDTO;
import com.sc.nft.entity.dto.SecondCollectionConfigDTO;
import com.sc.nft.entity.dto.SecondCollectionDTO;
import com.sc.nft.entity.vo.BrandConfigAdminVO;
import com.sc.nft.entity.vo.UserWithCollectionSimpleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 二级藏品配置表(sc_second_collection_config)数据Mapper
 *
 * @author kancy
 * @description 由 Mybatisplus Code Generator 创建
 * @since 2022-10-03 16:53:14
 */
@Mapper
public interface SecondCollectionConfigMapper extends BaseMapper<SecondCollectionConfig> {
    Page<SecondCollectionDTO> pageSecond(@Param("page") IPage page, @Param("firstTitle") String firstTitle, @Param("marketType")Integer marketType, @Param("newOrOld") Boolean newOrOld);

    /**
     *  品牌孵化配置列表
     * @param page
     * @param showLevel
     * @param userCreatorId
     * @param sortType
     * @return
     */
    Page<BrandConfigVO> brandConfigPage(IPage page,@Param("firstTitle") String firstTitle, @Param("showLevel") Integer showLevel, @Param("userCreatorId")Long userCreatorId, @Param("sortType")Integer sortType);

    /**
     * 自由二级配置列表
     * @param page
     * @param firstTitle
     * @param showLevel
     * @param userCreatorId
     * @param sortType
     * @return
     */
    Page<SecondCollectionConfigDTO> freeMarketPage(IPage page, @Param("firstTitle") String firstTitle, @Param("showLevel") Integer showLevel, @Param("userCreatorId")Long userCreatorId, @Param("sortType")Integer sortType);

    /**
     * 自由二级配置列表
     * @param objectPage
     * @param firstTitle
     * @param showLevel
     * @param userCreatorId
     * @param sortType
     * @return
     */
    Page<SecondCollectionConfigDTO> freeMarketPagev3_7(Page<Object> objectPage, @Param("firstTitle") String firstTitle, @Param("showLevel") Integer showLevel, @Param("userCreatorId") Long userCreatorId, @Param("sortType") Integer sortType, @Param("status") Integer status);

    /**
     * 为方法freeMarketPagev3_7Count提供分页查询总数
     * @param firstTitle
     * @param showLevel
     * @param userCreatorId
     * @param sortType
     * @return
     */
    Integer freeMarketPagev3_7Count(@Param("firstTitle") String firstTitle, @Param("showLevel") Integer showLevel, @Param("userCreatorId") Long userCreatorId, @Param("sortType") Integer sortType, @Param("status") Integer status);

    List<BrandConfigAdminVO> brandConfigList();
    List<BrandConfigAdminVO> freemarketConfigList(@Param("firstTitle") String firstTitle,@Param("userId") Long userId);
    List<UserWithCollectionSimpleVO> getCollectionIdList(@Param("marketType") Integer marketType);

    /**
     * 5.4版本更新维护的自由市场列表手动分页查询总数
     *
     * @param freeMarketPageDTO
     * @return
     */
    Integer freeMarketPagev5_4Count(@Param("freeMarketPageDTO") FreeMarketPageDTO freeMarketPageDTO);
    /**
     * 5.4版本更新维护的自由市场列表分页列表
     *
     * @param toMp
     * @param freeMarketPageDTO
     * @return
     */
    IPage<SecondCollectionConfigDTO> freeMarketPagev5_4(Page toMp, @Param("freeMarketPageDTO") FreeMarketPageDTO freeMarketPageDTO);

}

